package org.langqiao.datatype;

public class ArithmeticDemo {

	public static void main(String[] args) {



	//定义几个数

	int i = 37;

	int j = 42;

	double x = 27.475;

	double y = 7.22;

	System.out.println("变量数值...");

	System.out.println(" i = " + i);

	System.out.println(" j = " + j);

	System.out.println(" x = " + x);

	System.out.println(" y = " + y);

	//加

	System.out.println("加...");

	System.out.println(" i + j = " + (i + j));

	System.out.println(" x + y = " + (x + y));

	//减

	System.out.println("减...");

	System.out.println(" i - j = " + (i - j));

	System.out.println(" x - y = " + (x - y));

	//乘

	System.out.println("乘...");

	System.out.println(" i * j = " + (i * j));

	System.out.println(" x * y = " + (x * y));

	//除

	System.out.println("除...");

	System.out.println(" i / j = " + (i / j));

	System.out.println(" x / y = " + (x / y));

	//从除法中求得余数

	System.out.println("计算余数...");

	System.out.println(" i % j = " + (i % j));

	System.out.println(" x % y = " + (x % y));

	//混合类型

	System.out.println("混合类型...");

	System.out.println(" j + y = " + (j + y));

	System.out.println(" i * x = " + (i * x));

	}

	}